package com.baizhi.app;

import com.baizhi.entity.R;
import com.baizhi.service.AlbumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/appAlbum")
public class AppAlbumController {
    @Autowired
    private AlbumService albumService;
    @GetMapping("/selectAlbum/{size}")
    public R selectAlbum(@PathVariable("size") @RequestParam(defaultValue = "6") Integer size){
        R r = albumService.selectAlbum(size);
        return r;
    }
    @GetMapping("/selectOneAlbum/{id}")
    public R selectOneAlbum(@PathVariable("id") Integer id){
        R r = albumService.selectOneAlbum(id);
        return r;
    }
}
